 {include file="public/header" /}
 <style>h2{ text-align: center; }hr{border-top: 20px solid #eee}</style>

 <body class="gray-bg">
    <div class="wrapper wrapper-content {:config('adminClass.main')}">
        <div class="">
          <a onclick="add()" href="javascript:void(0);" class="btn btn-primary ">添加倍率</a>
      </div>
        <div class="row">
            <div class="col-sm-12">
                {include file="public/tophead"}
                {include file="public/top" /}
                <div class="ibox-content">
                {include file="public/topsection"}
                    <h4 style="text-align: center;">概率用整数</h4>
                    <form class="form-horizontal" method="post">
                         {volist name="config" id='c'}
                        <div class="form-group">
                            <label class="col-sm-2 control-label">倍率：</label>
                            <div class="col-sm-9">
                                <input name="precent[]" type="text" class="form-control" value="{$c.precent}" required="">
                            </div>
                            <label class="col-sm-2 control-label">概率：</label>
                            <div class="col-sm-9">
                                <input name="v[]" type="text" class="form-control" value="{$c.v}" required="">
                            </div>
                            <button onclick="del()">x</button>
                        </div>
                        {/volist}
                    </form>
                </div>
            </div>
        </div> 
    </div>
{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}
<script type="text/javascript">
$(document).ready(function(){
     $(".i-checks").iCheck({
        checkboxClass: "icheckbox_square-green",
        radioClass: "iradio_square-green",
    })
})
function msg(){
    layer.msg("上传成功")
}
function add() {
    str="<div class=\"form-group\"><label class=\"col-sm-2 control-label\">倍率：</label><div class=\"col-sm-9\"><input name=\"precent[]\" type=\"text\" class=\"form-control\" value=\"\" required=\"\"></div><label class=\"col-sm-2 control-label\">概率：</label><div class=\"col-sm-9\"><input name=\"v[]\" type=\"text\" class=\"form-control\" value=\"\" required=\"\"></div><button onclick=\"del()\">x</button></div>";
   $('.form-horizontal').append(str);
}
$('button').click(function() {
   $(this).parents('.form-group').html('')
});
</script>
{include file="public/bottom" /}